package com.ruoyi.web.controller.system;

import java.util.List;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ruoyi.framework.web.base.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.system.domain.WxUser;
import com.ruoyi.system.service.IWeixinService;

/**
 * 微信用户模块管理
 * @author admin
 *
 */
@Controller
@RequestMapping("/system/wxUser")
public class WxUserController extends BaseController{
	
	private String prefix = "system/wxuser";
	
	@Autowired
	private IWeixinService weixinService;
	
	/**
	 * 视图页面展示
	 * @return
	 */
	@RequiresPermissions("system:wxUser:view")
    @GetMapping()
    public String index(){
        return prefix + "/wxuser";
    }
	/**
	 * 微信号列表页数据
	 * @param wxUser
	 * @return
	 */
	@RequiresPermissions("system:wxUser:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(WxUser wxUser){
        startPage();
        List<WxUser> list = weixinService.selectWxUserList(wxUser);
        return getDataTable(list);
    }

}
